/*
 * @Description: 充值
 * @Author: iamsmiling
 * @Date: 2021-06-10 23:20:01
 * @LastEditTime: 2021-06-10 23:51:43
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:get/get.dart';

enum RechargeChannel { alipay, wechat, unionPay }

extension RechargeChannelKit on RechargeChannel {
  String get name =>
      {
        RechargeChannel.alipay: "支付宝充值",
        RechargeChannel.wechat: "微信充值",
        RechargeChannel.unionPay: "云闪付"
      }[this] ??
      "";

  String get icon =>
      {
        RechargeChannel.alipay: R.image.alipaySmall,
        RechargeChannel.wechat: R.image.wechatPaySmall,
        RechargeChannel.unionPay: R.image.unionPay
      }[this] ??
      "";
}

class RechargeController extends GetxController {
  List<int> options = [10, 50, 100, 150, 1000, 3000, 5000, 10000];

  int currentIndex = 0;

  RechargeChannel channel = RechargeChannel.alipay;
}
